<link rel="stylesheet" type="text/css" href="assets/bootstrap-datepicker/css/datepicker.css" />

<!-- 主页-报销申请-新增招待申请单 -->
<section id="container">
    <!--main content start-->
    <section id="main-content">
        <section class="wrapper">
            <!--state overview end-->
            <div class="row">
                <div class="col-lg-12">
                        <div class="alert alert-block alert-danger fade in">
                                <button data-dismiss="alert" class="close close-sm" type="button">
                                    <i class="icon-remove"></i>
                                </button>
                                <strong>友情提示：</strong>
                                报销申请提交后，即发送给相关联项目负责人进行审批，根据具体报销金额大小区分是否需要高层领导审批。
                            </div>
                    <section class="panel">
                        <header class="panel-heading">
                            招待报销申请
                        </header>
                        <div class="panel-body">
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">项目名称</label>
                                <div class="col-sm-10">
                                    <input type="text" id="projNameId" proj-name-list="receptionTribursementEntity.projId,receptionTribursementEntity.projName" class="form-control" certus-required placeholder="自动检索，查询结果较多时候，系统不显示，需要尽量多输入相关字段" >
                                </div>

                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">分类</label>
                                <div class="col-sm-10">
                                    <select class="form-control" ng-model="receptionTribursementEntity.type" ng-change="companyCodeChange(receptionTribursementEntity.type)">
                                        <option ng-repeat="xx in dataList.companySelect" certus-required value="{{xx.code}}">{{xx.name}}</option>
                                    </select>
                                </div>
                            </div>
                            <!--<div class="form-group customerForm">
                                <label class="col-sm-2 control-label">报销类目</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" value="招待费用" disabled>
                                </div>
                            </div>-->
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">开票时间</label>
                                <div class="col-sm-10">
                                    <input id="satTime" class="form-control" certus-required>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">招待日期</label>
                                <div class="col-sm-10">
                                    <input id="entTime" certus-required class="form-control">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">招待标准</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" certus-required placeholder="请输入具体金额" certus-an-limit-length-num="15"  ng-model="receptionTribursementEntity.receptionStandard">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">所在城市</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" certus-required  certus-an-limit-length="100" ng-model="receptionTribursementEntity.city">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">地点</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" certus-required certus-an-limit-length="100" ng-model="receptionTribursementEntity.addr">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">备注</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control" placeholder="字数长度限制(120字以内)" certus-an-limit-length="120" certus-required ng-model="receptionTribursementEntity.remark"></textarea>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">原始单据数量</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" certus-required certus-an-limit-length-num="15" ng-model="receptionTribursementEntity.originDocumentQuantity">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">客户单位名称</label>
                                <div class="col-sm-10">
                                    <input class="form-control"  value=""  certus-required ng-model="receptionTribursementEntity.customUnitName">
                                    <!--<datalist id="browsersCus" ng-model="selected">
                                        <option ng-repeat="x in dataList.cusCompSelect" value="{{x.comName}}">
                                    </datalist>-->
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">决策人员</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control"  placeholder="请输入人员姓名" certus-an-limit-length="100" ng-model="receptionTribursementEntity.decisionMaker"></textarea>

                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">经办人员</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control" placeholder="请输入人员姓名" certus-an-limit-length="100" ng-model="receptionTribursementEntity.handler"></textarea>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">相关人员</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control" placeholder="请输入人员姓名" certus-an-limit-length="100"  ng-model="receptionTribursementEntity.relatedPersoner"></textarea>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">相关人员数量</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" certus-an-limit-length-num="15" placeholder="请输入整数" ng-model="receptionTribursementEntity.relatedPersonerNum">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">随同人员</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control" placeholder="请输入人员姓名" certus-an-limit-length="100" ng-model="receptionTribursementEntity.accompanyUserName"></textarea>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">随同人员数量</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" certus-an-limit-length-num="15" placeholder="请输入整数" ng-model="receptionTribursementEntity.accompanyUserNum">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">冲销金额(可选)</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" certus-an-limit-length-num="15" placeholder="如果需要冲销，请填写本栏冲销金额，和下面的借款单单号" ng-model="receptionTribursementEntity.chargeAgainest">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">借款单单号</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" list="browsersReim" placeholder="请从借款流程查询借款单号后拷贝到这里，请保证输入的借款单号正确" ng-model="receptionTribursementEntity.borrowCode">
                                    <datalist id="browsersReim" ng-model="selected">
                                        <option ng-repeat="x in dataList.triburseSelect" value="{{x.borrowerCode}}">
                                    </datalist>
                                </div>
                            </div>
                            <!-- <p class="default-buttons">
                                <a href="javascript:void(0);" class="button-back btn btn-info">取消</a>
                                <a href="javascript:void(0);" class="button-next  btn btn-info">提交</a>
                            </p> -->
                        </div>
                    </section>
<!-- 
                    <section class="panel">
                        <header class="panel-heading add-heading">
                            报销费用明细
                            <i class="add-icon icon-plus"> 新增</i>
                        </header>
                        <div class="panel-body">
                            <div id="entContainer" class="dlshouwen-grid-container"></div>
                            <div id="entToolBarContainer" class="dlshouwen-grid-toolbar-container"></div>
                        </div>
                    </section> -->

                    <section class="panel">

                        <div class="panel-body">

                            <p class="default-buttons">
                                <a href="javascript:void(0);" class="button-back btn btn-info" onclick="window.history.back()">返回</a>
                                <a href="javascript:void(0)" class="button-next  btn btn-success btn-l10" ng-click="zdbxlcSubmit()">确认提交</a>
                                <!-- <a href="javascript:void(0);" class="button-next  btn btn-info"><i class="icon-save"></i>
                                    暂存</a> -->
                            </p>
                        </div>
                    </section>
                </div>
            </div>
        </section>
    </section>
    <!--main content end-->
</section>

<script type="text/javascript" src="assets/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script type="text/javascript">
//    $("#satTime").datepicker({
//        format: 'yyyy-mm-dd'
//    });
//    $("#entTime").datepicker({
//        format: 'yyyy-mm-dd'
//    });

    var $$scope;

    $("#satTime").datetimepicker({
        format: 'YYYY-MM-DD',
        locale: moment.locale('zh-cn')
    }).on('dp.change', function (e) {
        var result = new moment(e.date).format('YYYY-MM-DD');
        if (result && !angular.isUndefined(result)) {
            $$scope.receptionTribursementEntity.invoiceTime = result;
        }
    });

    $("#entTime").datetimepicker({
        format: 'YYYY-MM-DD',
        locale: moment.locale('zh-cn')
    }).on('dp.change', function (e) {
        var result = new moment(e.date).format('YYYY-MM-DD');
        if (result && !angular.isUndefined(result)) {
            $$scope.receptionTribursementEntity.receptionTime = result;
        }
    });
</script>
<script type="text/javascript" src="js/entertain/entertain.js"></script>